/*
 * CDContentPanel.h
 *
 *  Created on: 2011-2-27
 *      Author: yangbo
 */

#ifndef CDCONTENTPANEL_H_
#define CDCONTENTPANEL_H_

#include <wx/window.h>
#include "ELTReader.h"

class CDContentPanel : public wxWindow {
public:
	CDContentPanel(wxWindow *parent);
	virtual ~CDContentPanel();
	void SetCDReader(ELTReader *cdReader);
	inline ELTReader* GetCDReader() { return m_cdReader ; }
	wxSize GetScrollSize();
private:
	ELTReader *m_cdReader;
    // any class wishing to process wxWidgets events must use this macro
    DECLARE_EVENT_TABLE()
    void OnPaint(wxPaintEvent& event);
    void OnEraseBackground(wxEraseEvent& event);
    void OnSize(wxSizeEvent& event);

    wxSize CalculateWinSizeFromFile(wxFileOffset fileSize);
};

#endif /* CDCONTENTPANEL_H_ */
